import {request} from './request'
export function addCart(data){
    return request({
        url:'/api/carts',
        method:'POST',
        data
    })
}

export function madifyCart(id,data){
    return request({
        url:'/api/carts/'+id,
        method:'PUT',
        data
    })
}

export function checkedCart(data){
    return request({
        url:'/api/carts/checked',
        method:'PATCH',
        data
    })
}

export function getCart(data=''){
    return request({
        url:'/api/carts?'+data,
        method:'GET',
        data
    })
}

export function deleteCart(id){
    return request({
        url:'/api/carts/'+id,
        method:'DELETE',
    })
}